package day6.homework;

import java.awt.HeadlessException;

public class Rectangle {
	private double height;
	private double width;

	public Rectangle() {
		this.height = 1;
		this.width = 1;
	}

	public Rectangle(double height) {
		this.height = height;
		this.width = height;
	}

	public Rectangle(double height, double width) {
		this.height = height;
		this.width = width;
	}

	public double zhouChang() {
		// double zhouChang = (width + height) * 2;
		// return zhouChang;

		return (width + height) * 2;
	}

	public double mianJi() {
		return width * height;
	}

	public double getHeight() {
		return height;
	}

	public void setHeight(double height) {
		this.height = height;
	}

	public double getWidth() {
		return width;
	}

	public void setWidth(double width) {
		this.width = width;
	}

	@Override
	public String toString() {
		return "Rectangle [height=" + height + ", width=" + width + "]";
	}

}